<template>
  <div>
    <i-switch v-model="switch1" @on-change="change" size="large"></i-switch>
    <i-switch v-model="switch1" @on-change="change"></i-switch>
    <i-switch v-model="switch1" @on-change="change" size="small"></i-switch>

    <i-switch>
      <span slot="open">开</span>
      <span slot="close">关</span>
    </i-switch>
    <i-switch>
      <Icon type="android-done" slot="open"></Icon>
      <Icon type="android-close" slot="close"></Icon>
    </i-switch>
    <i-switch size="large">
      <span slot="open">开启</span>
      <span slot="close">关闭</span>
    </i-switch>
    <i-switch size="large">
      <span slot="open">ON</span>
      <span slot="close">OFF</span>
    </i-switch>
  </div>
</template>

<script>
export default {
  data () {
    return {
      switch1: false
    }
  },
  methods : {
    change (sta) {
      console.log(sta);
      this.$Message.info("开关状态: " + sta);
    }
  }
}
</script>

<style>

</style>